﻿@model Orchard.Comments.Models.CommentPart


@if (WorkContext.CurrentUser == null) {
    <fieldset class="who">
        <legend id="add-comment">@T("Add a Comment")</legend>
        <ol>
            <li>
                @Html.LabelFor(m => m.Author, T("Name"))
                @Html.TextBoxFor(m => m.Author)
            </li>
            <li>
                @Html.LabelFor(m => m.Email, T("Email"))
                @Html.TextBoxFor(m => m.Email)
            </li>
            <li>
                @Html.LabelFor(m => m.SiteName, T("Url"))
                @Html.TextBoxFor(m => m.SiteName)
            </li>
        </ol>
    </fieldset>
}
else {
    @Html.Hidden("Name", WorkContext.CurrentUser.UserName ?? "")
    @Html.Hidden("Email", WorkContext.CurrentUser.Email ?? "")
}

@if (WorkContext.CurrentUser != null) { <h2 id="commenter">@if (WorkContext.CurrentUser != null) { @T("Hi, {0}!", Convert.ToString(Html.ItemDisplayText(WorkContext.CurrentUser)))}</h2> }
<fieldset class="what">
    <ol>
        <li>
            @Html.LabelFor(m => m.CommentText, T("Comment"))
            @Html.TextAreaFor(m => m.CommentText, new { rows = 10, cols = 30, @class = "comment-text" })
        </li>
        <li>
            @Html.HiddenFor(m => m.CommentedOn)
            @Html.HiddenFor(m => m.RepliedOn)

        </li>
    </ol>
</fieldset>
